package org.japo.java.swing.listeners;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.util.Random;
import org.japo.java.swing.igu.IGU;

public class GER extends MouseAdapter {

    
    Random azar = new Random (System.currentTimeMillis());
    
    
    
    private final IGU igu;

    public GER(IGU igu) {
        this.igu = igu;
    }

    @Override
    public void mouseExited(MouseEvent e) {
        
        igu.recolocarBoton();
    }

    @Override
    public void mouseMoved(MouseEvent e) {
        int xAleatoria = azar.nextInt(100) + 1;
        int yAleatoria= azar.nextInt(100) + 1;
        int x = e.getX();
        int y = e.getY();
        igu.MouseAcecha(x, y,xAleatoria, yAleatoria);

    }
}
